package com.java.star.mall.common.response;

import lombok.Getter;

/**
 * 响应状态码枚举类
 */
@Getter
public enum StatusCode {

    SUCCESS(0, "请求成功"),

    FAILED(1001, "请求失败"),

    VALIDATE_ERROR(1002, "参数校验失败"),

    RESPONSE_PACK_ERROR(1003, "数据不存在"),

    APP_ERROR(2000, "业务异常"),

    USER_ERROR(5001, "用户不存在"),

    FILE_UPLOAD_FAIL(6001, "文件上传失败"),

    JWT_UNAUTHORIZED_ERROR(7001, "未登录认证"),

    JWT_EXPIRED_ERROR(7002, "JWT已过期"),

    JWT_SIGNATURE_ERROR(7003, "JWT验证签名失败"),

    JWT_MALFORMED_ERROR(7004, "JWT格式错误"),

    PAY_ORDER_NOT_EXIST(8001, "支付订单不存在"),

    PAY_AMOUNT_NOT_MATCH(8002, "支付金额不匹配"),

    SYSTEM_ERROR(9999, "系统异常");

    private final int code;
    private final String msg;

    StatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
